const bodyParser = require("body-parser");
const Mock = require("mockjs");
const data = Mock.mock({
    "list|6": [{
        "id": "@id",
        "img": "@image(100x100,@color)",
        "title": "@ctitle",
        "name": "@cname",
        "name2": "@cname",
        "name3": "@cname",
        "word": "@cword(5,10)",
        "word2": "@cword(30,50)",
        "date": "@date()",
        "num|1000-100000": 6666
    }]
});
module.exports = {
    devServer: {
        before(app) {
            app.use(bodyParser.json())
            app.get('/list', (req, res) => {
                res.send(JSON.stringify(data.list))
            })
        }
    }
}